package cn.tedu.spring.example;

import org.springframework.stereotype.Component;

/**
 * Component注解：
 *  1.当前类表示为Spring的组件;
 *  2.框架会为该类创建一个对象[底层原理是反射]，放到Ioc容器中;、
 *      Class cls = Class.forName("cn.tedu.spring.example.User");
 *      Constructor constructor = cls.getConstructor();
 *      User user = constructor.newInstance();
 *      把user对象存入IoC容器的地方;
 */
@Component
public class User {
    public void doSome(){
        System.out.println("Hello World");
    }
}
